package com.cykj.feign.impl;

import com.cykj.feign.ProDuctFeignClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * Project:JDMS
 * Package:com.cykj.feign.impl
 *
 * @Description:
 * @Author:其一
 * @CreateTime: 2025-08-04-10-24
 */
@Component
public class ProDuctFeignClientFactoryImpl implements FallbackFactory<ProDuctFeignClient> {
    @Override
    public ProDuctFeignClient create(Throwable cause) {
        cause.printStackTrace();//打印异常的信息
        System.out.println("这里发生熔断了");
        //采用降级措施
        return new ProDuctFeignClientImpl();
    }
}
